Skip to content

docs: add full architecture diagram - #31

Merged
yash-pouranik merged 5 commits into
mainfrom
docs/architecture-diagram
Mar 4, 2026
Merged

docs: add full architecture diagram#31
yash-pouranik merged 5 commits into
mainfrom
docs/architecture-diagram

Conversation

@yash-pouranik

@yash-pouranik yash-pouranik commented Mar 4, 2026

Copy link
Copy Markdown
Member

📐 docs: Add Full Architecture Diagram

Overview

Adds a comprehensive ARCHITECTURE_DIAGRAM.md to the project root documenting the entire urBackend system architecture.

What's Included

Diagram Description
System Overview Full component map — clients → frontend → backend → data layer
API Request Flow Sequence diagram of Redis-cached API key auth
BYOD Flow Flowchart of Bring Your Own DB/Storage connection logic
MongoDB Data Models ER diagram covering all 5 schemas
Frontend Structure Vite + React page & component hierarchy
Security & Rate Limiting Table summarising all security layers
Infrastructure Overview Hosting + all external services (Atlas, Redis, Supabase, SMTP)

Why

Makes it easier for new contributors and collaborators to quickly understand how the system is structured without having to read through all the source files.

Type of Change

  • Documentation only (no code changes)

Summary by CodeRabbit

  • Documentation
    • Added comprehensive architecture documentation including system diagrams, API request flows, data models, frontend structure, security details, and infrastructure overview.

@vercel

vercel Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ur-backend Ready Ready Preview, Comment Mar 4, 2026 8:23am

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a detailed ARCHITECTURE_DIAGRAM.md file to the project's documentation. This new document provides a holistic view of the urBackend system, covering its various components, data flows, and infrastructure. Its primary goal is to enhance understanding for new contributors and collaborators, enabling them to quickly grasp the system's structure without extensive code exploration.

Highlights

  • System Overview: A comprehensive Mermaid diagram illustrating the client-to-data layer flow, including frontend, backend (middleware, routes, controllers, utils), and data layer components.
  • API Request Flow: A sequence diagram detailing the Redis-cached API key authentication process for external applications.
  • BYOD (Bring Your Own Database/Storage) Flow: A flowchart explaining the Bring Your Own Database/Storage connection logic, including connection management and dynamic model injection.
  • MongoDB Data Models: An ER diagram outlining the relationships and schemas for Developer, Project, Collection, FieldSchema, OTP, and Log entities.
  • Frontend Structure: A diagram showing the Vite + React application's structure, from entry points and providers to pages and shared components.
  • Security & Rate Limiting: A table summarizing various security layers and rate-limiting mechanisms, such as dashboardLimiter, apiLimiter, JWT, API key verification, CORS, and AES-256-GCM encryption.
  • Infrastructure Overview: A diagram illustrating the hosting environment (Vercel, Render/Railway) and external services used (MongoDB Atlas, Upstash Redis, Supabase, SMTP), including BYOD options.
Changelog
  • ARCHITECTURE_DIAGRAM.md
    • Added a new comprehensive architecture diagram for the urBackend system.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@yash-pouranik has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 54 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a84effec-5b5a-4eb7-85b6-c27ac1522e08

📥 Commits

Reviewing files that changed from the base of the PR and between 617d667 and 5b4b1be.

📒 Files selected for processing (1)
  • ARCHITECTURE_DIAGRAM.md
📝 Walkthrough

Walkthrough

A new architecture documentation file is added containing comprehensive system diagrams and flow explanations for the urBackend system, covering frontend, backend, data layer, API request flows, security, and infrastructure components. No code changes are introduced.

Changes

Cohort / File(s) Summary
Documentation
ARCHITECTURE_DIAGRAM.md
New file with 303 lines documenting system architecture, including mermaid diagrams for frontend/backend structure, API request flows, MongoDB data models, security mechanisms, rate limiting, and infrastructure overview.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A map of the system, drawn with care,
Architecture flows dancing through the air,
Diagrams and paths now crystal clear,
The blueprint of magic we all hold dear!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add full architecture diagram' is fully related to the main change, which is adding a comprehensive ARCHITECTURE_DIAGRAM.md file documenting the complete urBackend system architecture.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/architecture-diagram

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive architecture diagram, which is a great addition for onboarding new contributors. The diagrams are clear and cover the main aspects of the system. I've left a couple of minor suggestions to improve the accuracy of the diagrams.

Note: Security Review has been skipped due to the limited scope of the PR.

Comment thread ARCHITECTURE_DIAGRAM.md Outdated
Comment thread ARCHITECTURE_DIAGRAM.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ARCHITECTURE_DIAGRAM.md`:
- Around line 94-95: The diagram shows a redundant/circular edge from REDIS_DB
to REDIS; update the flow so the verifyApiKey middleware (API_MW) points to the
redisCaching.js utility (REDIS) which then points to the actual Redis service
(REDIS_DB) — remove the REDIS_DB --> REDIS edge and replace with API_MW
-->|"Cache lookup"| REDIS and REDIS --> REDIS_DB to reflect that verifyApiKey
uses redisCaching.js which connects to Redis.
- Line 296: The diagram edge uses an undefined node name ExternalApp causing a
dangling edge; update the diagram so the node name matches the existing entity
EXTAPP (or else define ExternalApp explicitly). Replace ExternalApp with EXTAPP
on the edge (EXTAPP -->|"x-api-key"| BE) or add a node definition/subgraph for
ExternalApp to match the rest of the diagram; ensure the referenced node symbol
(ExternalApp or EXTAPP) is consistently used wherever the BE node edge with
"x-api-key" appears.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c52ed36b-a280-4f6a-a8d1-e964720fdebc

📥 Commits

Reviewing files that changed from the base of the PR and between ec58b3f and 617d667.

📒 Files selected for processing (1)
  • ARCHITECTURE_DIAGRAM.md

Comment thread ARCHITECTURE_DIAGRAM.md Outdated
Comment thread ARCHITECTURE_DIAGRAM.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@yash-pouranik
yash-pouranik merged commit 4f88fbb into main Mar 4, 2026
9 checks passed
@yash-pouranik
yash-pouranik deleted the docs/architecture-diagram branch March 4, 2026 15:45
@coderabbitai coderabbitai Bot mentioned this pull request Mar 7, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant